home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010921-20020314 / 000112_fdc@watsun.cc.columbia.edu_Sun Nov 4 20:39:32 EST 2001.msg < prev    next >
Text File  |  2020-01-01  |  5KB  |  110 lines

  1. Article: 12930 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
  3. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.unix.sco.misc,comp.protocols.kermit.misc
  5. Subject: Re: Dropping DTR in OSR5
  6. Date: 5 Nov 2001 01:39:05 GMT
  7. Organization: Columbia University
  8. Lines: 93
  9. Message-ID: <9s4qjp$30k$1@newsmaster.cc.columbia.edu>
  10. References: <9s40rp$fdh$1@newsmaster.cc.columbia.edu> <3be5c667$0$439$8eec23a@newsreader.tycho.net> <20011104160917.A13779@mammoth.ca.caldera.com>
  11. NNTP-Posting-Host: watsun.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1004924345 3092 128.59.39.2 (5 Nov 2001 01:39:05 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 5 Nov 2001 01:39:05 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.unix.sco.misc:139888 comp.protocols.kermit.misc:12930
  16.  
  17. In article <20011104160917.A13779@mammoth.ca.caldera.com>,
  18. Bela Lubkin  <belal@caldera.com> wrote:
  19. : John DuBois wrote:
  20. : > ...
  21. : > Some problems in this area were fixed in 5.0.6a.  Please test on that
  22. : > release and see if you still encounter this problem.
  23. : While this is true, Frank likes to support every OS ever made.  I
  24. : believe he still builds binaries for SCO Xenix.  A solution which
  25. : requires users to have an OS less than a year old won't satisfy him...
  26. Strange but absolutely true.  People still run old -- even ancient --
  27. Unix OS's, including SCO Xenix.  Doctors' offices are a good place to
  28. look for computing antiques.  I know a doctor who runs his practice from
  29. an AT&T 3B2.  The billing package only runs there, the vendor disappeared
  30. decades ago...
  31.  
  32. : The OpenServer "sio" driver doesn't implement ispeed and ospeed as
  33. : separate entities.  The functions exist and the structures have all the
  34. : necessary members, but it doesn't pay attention to the input rate, only
  35. : the output rate.  At least, that's how it's _intended_ to work.
  36. :
  37. Aha, the truth comes out...  Strict POSIX on the outside, not so strict
  38. on the inside :-)
  39.  
  40. Actually a pet peeve of mine is how latter-day SCO header files (and
  41. most other vendors) are full of:
  42.  
  43.   #if !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE)
  44.  
  45. to keep you from getting at anything useful -- hardware flow control, for
  46. example.  In many cases also high serial speeds.  But I digress...
  47.  
  48. : I vaguely remember that you can get into trouble -- confuse the driver --
  49. : by trying to change both.  This might have been one of the things fixed in
  50. : rs506a.  But I think the problem can be avoided on all releases, by only
  51. : programming the output speed.  So, suppose you test with only changing
  52. : ospeed, see whether that makes a difference?
  53. I just tried this on 5.0.2 -- no difference.  DTR and RTS go down,
  54. but only DTR come back up.
  55.  
  56. : This also isn't a general solution.  There are third party drivers that
  57. : slot into the same ioctls, but _do_ correctly support independent i/o
  58. : speeds.  Does Kermit have any system-specific hint settings?  Something
  59. : like an OpenServer-specific "set ignore-ospeed", turned on by default?
  60. : "On" is the correct default since "sio" is the most common serial driver
  61. : on OpenServer, and split-speed usage is rather uncommon.
  62. The third-party drivers is a land I don't have a passport for.  Device
  63. names, lockfile conventions, who knows what else.  I have reams of
  64. correspondence on this stuff, and the conclusion is always "don't touch
  65. it".  I figure if Digi or Stallion or somebody wants Kermit to support
  66. their stuff, they'll contact me about it.
  67.  
  68. : And, if I'm wrong, you might try an even kludgier workaround (which also
  69. : might not work, but is definitely worth trying): after having performed
  70. : all the POSIXly correct incantations, i.e. after the 2nd tcsetattr() in
  71. : your pseudo-code above, force an extra open of the port:
  72. :   ...
  73. :   tcsetattr()
  74. :   if ((kludge_fd = open(the_port, O_RDONLY | O_NONBLOCK | O_NOCTTY)) >= 0)
  75. :     close(kludge_fd);
  76. : I'm pretty sure this will cause "sio" to get its house in order and
  77. : raise DTR (and the close shouldn't lower it, since the other open still
  78. : exists).  For debugging purposes you might need to put in a pause before
  79. : the close() to observe that DTR actually goes on -- I don't fully trust
  80. : my assertion that the close() won't lower it.
  81. In fact DTR comes back on, but RTS stays down, just as without the kludge.
  82. The kludge does make a difference in 5.0.5, however: it makes it act like
  83. 5.0.2 (without the kludge in 5.0.5, both DTR and RTS stayed down).
  84.  
  85. : One last thing.  There's a comment in the driver that implies that after
  86. : cycling the baud rate through 0, DTR might not come back up immediately;
  87. : might only come up when you output a character.  I'm pretty sure this is
  88. : fixed in rs506a, but for older releases, see whether outputting a NUL
  89. : after the 2nd tcsetattr() causes DTR to wake up.
  90. In 5.0.2 DTR came up anyway, but RTS does not come back up, even when you
  91. send bytes.   Ditto for 5.0.5 with and without all the above tricks.
  92.  
  93. In short there seems to be no way to do this in OSR5 prior to 5.0.6a.  Hard
  94. to believe, right?  But not surprising either since I think Kermit must be
  95. the only program that would want to momentarily drop DTR without closing the
  96. device (and of course the problem with closing the device is that you've
  97. lost all the myriad setups you've done on it when you reopen it).
  98.  
  99. Thanks!
  100.  
  101. - Frank
  102.